home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr26 / blrmu13.zip / CLR.ASM < prev    next >
Assembly Source File  |  1993-06-01  |  2KB  |  53 lines

  1. page ,132
  2. title clr ( clear the screen ) 01/14/92 - 01:00 am
  3. ;
  4.          .model small
  5.          .code
  6. ;
  7.          org   256
  8. ;
  9. clr      proc  far
  10. ;
  11. ;   set crsr position = 0,0
  12. ;
  13.          mov   ah,2                    ; set cursor position fct
  14.          mov   bh,0                    ; page 0
  15.          mov   dh,0                    ; row 0
  16.          mov   dl,0                    ; col 0
  17.          int   16                      ; video int
  18. ;
  19. ;   get char and attr at crsr
  20. ;
  21.          mov    ah,8                   ; read char and attr at crsr fct
  22.          mov    bh,0                   ; bh = page 0
  23.          int    16                     ; video int
  24.          mov    ch,ah                  ; get attr
  25.          mov    cl,al                  ; get char ( but don't use it )
  26. ;
  27. ;   wrt char and attr at crsr
  28. ;
  29.          mov   ah,9                    ; wrt char and attr at crsr fct
  30.          mov   al,32                   ; al = char = space
  31.          mov   bl,ch                   ; bl = attr
  32.          mov   bh,0                    ; bh = page 0
  33.          mov   cx,2000                 ; max characters to wrt
  34.          int   16                      ; video int
  35. ;
  36. ;   set crsr position = 0,0
  37. ;
  38.          mov   ah,2                    ; set cursor position fct
  39.          mov   bh,0                    ; page 0
  40.          mov   dh,0                    ; row 0
  41.          mov   dl,0                    ; col 0
  42.          int   16                      ; video int
  43. ;
  44. ;   exit with return code = 0
  45. ;
  46.          mov   al,0                    ; return code = 0
  47.          mov   ah,76                   ; terminate with ret code fct
  48.          int   33                      ; dos int
  49. ;
  50. clr      endp
  51. ;
  52.          end   clr
  53.